home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2006 October / wn148cd2.iso / Windows / Travailler / QuickZip / quickzip_460013.exe / {app} / Scripts / File / Akp Add Newer Files.akp < prev    next >
Text File  |  2005-02-02  |  682b  |  23 lines

  1. const updateInterval = 2;
  2. var today_d,today_m,today_y : Word;
  3.     k : string;
  4.     i : integer;
  5.   function NeedUpdate(filename : string) : boolean;
  6.   var d,m,y : Word;
  7.   begin
  8.      DecodeDate(GetFileDateTime(filename),y,m,d);
  9.      if (y = today_y) or (m = today_m) or
  10.        (Abs(today_d - d) < UpdateInterval) then
  11.          Result := true else Result := false;
  12.   end;
  13. begin
  14.   DecodeDate(Now,today_y,today_m,today_d);
  15.   k := Extractfilepath(ParamList.Strings[0]);
  16.   New(Format('%s%d_%d_%d.zip',[
  17.      k,today_y,today_m,today_d]));
  18.   for i := 0 to ParamList.count -1 do
  19.     if NeedUpdate(ParamList.Strings[i]) then
  20.       Add(ParamList.Strings[i]);
  21.   DoAdd;
  22. end.
  23.